import json
import os

from config import BASE_PATH


def write_dict_to_json(dict, filename='account_info.json'):
    json_str = json.dumps(dict, indent=4,ensure_ascii=False)
    path = BASE_PATH + os.sep + 'data' + os.sep + filename
    with open(path, 'w', encoding='utf-8') as json_file:
        json_file.write(json_str)


if __name__ == '__main__':
    dict = {'task_username': '111', 'jiamingceshi_username': '$jiamingceshi_username', 'skip_wsy_debug': True}
    write_dict_to_json(dict)
